package homeWork.day03_5_16;

import java.util.*;

/**
 * 生成10个0-100的随机数并存入一个List集合中并输出
 * 之后将集合第3到第6个元素翻转并输出
 * 
 * @author Xiloer
 *
 */
public class Test04 {
    public static void main(String[] args) {
        List<Integer> list=new ArrayList<>();
        Random ran=new Random();
        for(int i=0;i<10;i++){
            list.add(ran.nextInt(101));
        }
        for(Integer i:list)
            System.out.print(i+" ");
        System.out.println();
        List<Integer> integers = list.subList(2, 6);
        Collections.reverse(integers);
        for(Integer i:list)
            System.out.print(i+" ");

    }
}
